<template>
  <div class="flower-ai-app">
    <header class="app-header">
      <h1>花艺AI测试应用</h1>
    </header>
    <main class="app-main">
      <section class="image-generation-section">
        <h2>生成花艺图像</h2>
        
        <div class="input-group">
          <label for="design-description">描述你想要的花艺设计：</label>
          <textarea 
            id="design-description" 
            v-model="designDescription" 
            class="description-input"
          ></textarea>
        </div>

        <div class="style-selection">
          <label>选择图像风格：</label>
          <select v-model="selectedStyle" class="style-select">
            <option value="watercolor">水彩风格</option>
            <option value="realistic">写实风格</option>
            <option value="minimalist">极简风格</option>
            <option value="oil-painting">油画风格</option>
          </select>
        </div>

        <button class="generate-btn" @click="generateImage">生成图像</button>

        <div class="examples">
          <p>示例：</p>
          <ul class="example-list">
            <li>"一束粉红色和白色的玫瑰与满天星"</li>
            <li>"现代风格的东方兰花与竹子的插花"</li>
          </ul>
        </div>
      </section>
    </main>
  </div>
</template>

<script>
import { ref } from 'vue';
const isCollapsed = ref(false);
export default {
  name: 'Generate',
  data() {
    return {
      designDescription: '',
      selectedStyle: 'watercolor',
      generatedImage: null
    }
  },
  methods: {
    generateImage() {
      console.log('生成图像描述:', this.designDescription);
      console.log('选择风格:', this.selectedStyle);
      
    },
  }
}
</script>

<style scoped>
.flower-ai-app {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Arial', sans-serif;
  color: #333;
}

.app-header {
  text-align: center;
  margin-bottom: 20px;
}

.app-header h1 {
  font-size: 28px;
  margin-bottom: 5px;
}

.subtitle {
  font-size: 14px;
  color: #666;
}

.app-nav {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.nav-btn {
  padding: 8px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #666;
}

.nav-btn.active {
  color: #4a8af4;
  font-weight: bold;
  border-bottom: 2px solid #4a8af4;
}

.image-generation-section {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
}

.image-generation-section h2 {
  margin-top: 0;
  font-size: 20px;
  color: #444;
}

.input-group {
  margin-bottom: 15px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.description-input {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  resize: vertical;
}

.style-selection {
  margin-bottom: 20px;
}

.style-selection label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.style-select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
}

.generate-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: #ff6b6b;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  margin: 25px 0;
}

.generate-btn:hover {
  background-color: #ff5252;
}

.examples {
  margin-top: 25px;
  font-size: 14px;
  color: #666;
}

.example-list {
  padding-left: 20px;
  margin-top: 8px;
}

.example-list li {
  margin-bottom: 5px;
  font-style: italic;
}

</style>